<?php


function getSinglePictureUrl($index){
$i = 0;
$hostname="localhost";
$username="root";
$password="";
$database="db_dinkonst";

//Connnects to database
mysql_connect($hostname,$username,$password);
mysql_select_db($database) or die( "Unable to select database");


$result = mysql_query("select pictureURL from items where item_id = $index");//Lägg till genre med
$row = mysql_fetch_array($result);

$pictureURL = $row['pictureURL'];



return $pictureURL;


mysql_close();

}

//$hej = getSinglePictureUrl(1);
//print $hej;
//echo "<img src ='../Bildgalleri/Paintings/$hej' />";
?>
